<template>
  <div class="stepCard flex-row row-center column-center" :class="isActive? 'active': ''">
    <!-- <slot name="img" v-if=""></slot> -->
    <img :src="cardObj.imgActive" alt="icon" v-show="isActive && cardObj.imgActive" />
    <img :src="cardObj.imgNormal" alt="icon" v-show="!isActive && cardObj.imgNormal" />
    <span> {{ cardObj.text }}</span>
  </div>
</template>
<script>

export default {
  name: "stepCard",
  props: {
    isActive:false,
    cardObj: {
      type: Object,
      default: () => {
        return {
          text: 'eee',
          imgActive: require('@/assets/myself_img/icon_hammer.png'),
          imgNormal: require('@/assets/myself_img/icon_hammer_n.png'),
        }
      },
    },
  },
  data() {
    return {

    };
  },
  mounted() {},
};
</script>
<style lang="scss" scoped>
.stepCard{
  width: 100%;
  height: 100%;
  background: rgba(117,121,128, .1);
  border-radius: 20px;
  font-size: 18px;
  font-family: Alibaba PuHuiTi;
  font-weight: 500;
  color: #757980;
  // cursor: pointer;
  &.active{
    background: rgba(2,81,251, .1);
    color: #3670F5;
  }
  img{
    width: 20px;
    height: 20px;
    margin-right: 8px;
  }
}
</style>
